package com.qf.mapper;

import com.qf.entity.MallGoodsSpecOptionsEntity;
import com.qf.entity.MallGoodsTemplateEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface TemplateMapper {


    List<MallGoodsTemplateEntity> findByPage(MallGoodsTemplateEntity entity);

    @Insert("insert into mall_goods_template (brands,spec,name) values(#{brands},#{spec},#{name})")
    int add(MallGoodsTemplateEntity entity);

    @Delete("delete from mall_goods_template where id=#{id}")
    int delete(String id);

    @Update("update mall_goods_template set brands=#{brands},spec=#{spec},name=#{name} where id=#{id}")
    int update(MallGoodsTemplateEntity entity);
}
